import pygame,sys,random,time
pygame.init()
c1=600
c2=600
c3=10
c4=1
c5=100
screen=pygame.display.set_mode([c1,c2])#大小
screen.fill([255,255,255])
pygame.display.flip()
for i in range(c5):
    x=random.randint(0,10)
    if x<4:
        pygame.draw.rect(screen,[random.randint(0,255),random.randint(0,255),random.randint(0,255)],[random.randint(0,c1-c1/5),random.randint(0,c2-c2/5),random.randint(1,c1/2),random.randint(1,c2/2)],random.randint(c4,c3))
    if x>3 and x<7:
        pygame.draw.circle(screen,[random.randint(0,255),random.randint(0,255),random.randint(0,255)],[random.randint(0,c1-c1/5),random.randint(0,c2-c2/5)],random.randint(1,(c1+c2)/5),random.randint(c4,c3))
    if x>6:
        pygame.draw.ellipse(screen, [random.randint(0,255),random.randint(0,255),random.randint(0,255)], [random.randint(0,c1-c1/5),random.randint(0,c2-c2/5),random.randint(1,c1/2),random.randint(1,c2/2)],random.randint(c4,c3) )
pygame.display.flip()

run=True
while run:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            run=False


pygame.quit()
#image.png